import request from '../utils/request';

export default {
     getAllProjectCount(){
        return request({
            url: '/index/getAllProjectCount',
            method: 'get',
        });
    },
    getAllTargetCount(){
        return request({
            url: '/index/getAllTargetCount',
            method: 'get',
        });
    },
    changePwd(username,password,newPassword){
        return request({
            url: `/user/updatePassword`,
            method: 'post',
            params:{
                username,password,newPassword
            } 
        });
    },
    getCode(mail){
        return request({
            url: `/pwdReset/getCodeByMail`,
            method: 'post',
            params:{
                mail
            } 
        });
    },
    submitForgetPwd(mail,securityCode,newPassword){
        return request({
            url: `/pwdReset/resetPassword`,
            method: 'post',
            params:{
                mail,
                securityCode,
                newPassword
            } 
        });
    }
}
